home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Bus / T-Z / VCR+(app+src) Folder / Sources / lookup2.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-17  |  371 b   |  26 lines  |  [TEXT/KAHL]

  1. #include "VCRplus.h"
  2.  
  3. extern    unsigned long    start[480], leng[480] ;
  4.  
  5. /* the 512-entry tables of starting time and pgm duration */
  6. long     lookup2(    long     stime, long durat)
  7. {
  8.     long     j;
  9.  
  10.     for(j=0; j<481; j++)
  11.     {
  12.         if(stime == start[j])
  13.         {
  14.             if(durat == leng[j]) break ;
  15.         }
  16.     }
  17.  
  18.     if( j >= 480 )
  19.     {
  20.         SetDText(dlgMESSAGE,"\pMissing index entry!");
  21.         j = 0;
  22.     }
  23.     
  24.     return(j);
  25. }
  26.